#include <stdio.h>
struct address
{
	char *country;
	char *city;
};
struct student
{
	char *name;
	char *sex;
	int age;
	struct address address;
};
void print_student(struct student s)
{	
	printf("s.name = %s\n",s.name);
	printf("s.sex = %s\n",s.sex);
	printf("s.age = %d\n",s.age);
	printf("s.address.country = %s\n",s.address.country);
	printf("s.address.city = %s\n",s.address.city);
}
int main(void)
{
	printf("************* 逐个成员初始化 ***********");
	struct student s1,s2;
	s1.name = "zhangjin";
	s1.sex = "man";
	s1.age = 25;
	print_student(s1);
	printf("************* 一次性初始化多个成员 ***********");
	struct address a1 = {"hubei","xiaogan"};
	struct student s3 = {"jin","man",25,a1},s4 = {"jin","man",26,{"hubei","wuhan"}};
	print_student(s3);
	print_student(s4);
	return 0;
}
